import ReactDOM from 'react-dom';
import React from 'react';
import {Provider} from 'react-redux'
import {HashRouter,Route,IndexRoute,Switch} from 'react-router-dom';
import {Header,Nomatch} from './Components'
import {routes} from './router/router.config';
import 'element-theme-default';

ReactDOM.render(
            <HashRouter>
                <div>
                <Header></Header> 
                <Switch>
                    {
                        routes.map((item,index)=>{
                            return <Route key={index} 
                            path={item.path} 
                            exact={item.exact}
                            component={item.component}/>
                        })
                    }
                    <Route component={Nomatch}></Route>
                </Switch>
                    
                   
                    
                </div>
            </HashRouter>,
            document.getElementById('app')
)